﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace zlh.Adminyemian
{
    public partial class adminshouye : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                ListItem item = DropDownList1.Items.FindByValue(Theme);
                if (item != null)
                {
                    item.Selected = true;
                }
            }
            Session["color"] = DropDownList1.SelectedValue;
        }

        protected void Page_PreInit(object sender, EventArgs e)
        {

            if (Request.QueryString["Theme"] == null)
            {
                Theme = "1";

            }
            else
            {
                Page.Theme = Request.QueryString["Theme"].ToString();


            }

        }

        protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string url = Request.Path + "?Theme=" + DropDownList1.SelectedItem.Value;
            Response.Redirect(url);
        }
    }
}